package com.aya.decorate;

import com.aya.decorate.decorateimpl.Sugar;
import com.aya.decorate.decorateimpl.Whie;
import com.aya.decorate.impl.Mongo;

public class Main {
    public static void main(String[] args) {
        // 芒果 12元
        Beverage beverage = new Mongo();
        // 芒果 0.5 元
        beverage = new Sugar(beverage);
        // 奶泡 2 元
        beverage = new Whie(beverage);
        // 14.5 元
        System.out.println(beverage.cost());


    }
}
